package cn.zw.design.observer.jdk;

import java.util.Observable;

public class WeatherData extends Observable {
	
	
	private float temp; //温度
	private  float pressure; // 气压
	private float humidity; // 湿度
	public float getTemp() {
		return temp;
	}
	public float getPressure() {
		return pressure;
	}
	public float getHumidity() {
		return humidity;
	}
	
	 public void  measurementsChanged(){
		 setChanged();
		 notifyObservers();
	 }
	 
	 public  void  setParams(float temp,float pressure,float humidity){
		 this.humidity = humidity;
		 this.pressure = pressure;
		 this.temp = temp;
		 measurementsChanged();
	 }
	
	
	
	
	 
	 
}
